#define  _CRT_SECURE_NO_WARNINGS 1

#include"sort.h"

void TestBubbleSort()
{
	int a[] = { 6,1,2,7,9,3,4,5,10,8 };
	BubbleSort(a, sizeof(a) / sizeof(int));
	PrintArr(a, sizeof(a) / sizeof(int));
}

void TestQuickSort()
{
	int a[] = { 8,1,2,7,9,3,4,5,10,6,-1,-4,-5,-9,-6,6 ,-9,4,7,3,2,0,-11,6 };
	QuickSort(a, 0, sizeof(a) / sizeof(int) - 1);
	PrintArr(a, sizeof(a) / sizeof(int));
}

void TestInsertSort()
{
	int a[] = { 8,1,2,7,9,3,4,5,10,6,-1,-4,-5,-9,-6,6 ,-9,4,7,3,2,0,-11};
	InsertSort(a, sizeof(a) / sizeof(int));
	PrintArr(a, sizeof(a) / sizeof(int));
}

void TestQuickSortNonR()
{
	int a[] = { 8,1,2,7,9,3,4,5,10,6 };
	QuickSortNonR(a, 0, sizeof(a) / sizeof(int) - 1);
	PrintArr(a, sizeof(a) / sizeof(int));
}

int main()
{
	//TestBubbleSort();
	//TestQuickSort();
	TestQuickSortNonR();
	//TestInsertSort();
	return 0;
}